<?php

namespace app\common\model\mysql;

use think\Model;

class CustomerOweBucket extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'cus_customer_owe_bucket';

    /**
     * 根据where条件获取客户欠桶数据
     * @param array $where
     * @param string $field
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getCustomerOweBucketFind(array $where = [], string $field = "*"){
        $result = $this->where($where)->field($field)->find();
        return $result ? $result->toArray() : [];
    }
}
